<template>
	<view class="agreement_page">
		<view class="agreement_title">{{info.title}}</view>
		<view class="agreement_content" v-if="info.content">
			<mp-html :content="info.content" />
			<!-- <rich-text :nodes="info.content" class='content'></rich-text> -->
		</view>
	</view>
</template>

<script>
	import {
		getAgreement,
	} from '@/api/motortime.js';
	let app = getApp()
	export default {
		data() {
			return {
				info: '',
				club_id: 0
			};
		},
		onShow() {

		},
		onLoad(options) {
			this.club_id = options.club_id ? options.club_id : 0
			this.getAgreement(options.scene)
		},
		methods: {
			getAgreement(id) {
				getAgreement({
					id: id,
					club_id: this.club_id
				}).then(res => {
					if (res.state == 1) {
						this.info = res.data
						uni.setNavigationBarTitle({
							title: res.data.title
						})
						var params = {
							event_code: '协议内容',
							path: 'pages/agreement/agreement',
							event_id: res.data.id,
							title: res.data.title,
							source_page: '',
							value: '',
						}
						app.BurialPoint(params)
					}

				})
			}
		},
		onShareAppMessage(res) {
			app.getShareTask()
			return {

			}
		}
	}
</script>

<style lang="scss">
	.agreement_page {
		padding: 30rpx;
		font-size: 28rpx;

		.agreement_title {
			font-size: 36rpx;
			font-weight: bold;
			text-align: center;
		}

		.agreement_content {
			margin-top: 20rpx;
		}
	}
</style>